Q: In Version 2.0, I am using the new Windows submenu. For each new window document that I create in my app, a new menu cell is added to the submenu with the window title and a small X at the left-most edge of the menu cell. How do I programmatically control this X to make it broken when the document associated with the menu cell has been changed?\
\
A: The window method
\f0\fs24 setDocEdited: (BOOL)flag
\f2\fs28 is responsible for displaying the broken X when it is set to YES. This method controls both the X in the menu cell, and the X on the upper right corner of the window. It has to be reset to NO
\b before saving the document
\b0 , so that the X reappears as non-broken. See the code snippet below:\
/* In the case of a text object for example,this text delegate method is responsible for notifying that the document has changed. Please note that ruler and font changes as well as changes caused by spell checking the Text are not reflected by this text delegate method.\